public class Australia {
    public static void main(String[] args) {
        Animals animals = new Animals(10);
        animals.add(new Cat());
        animals.add(new Rabbit());
        animals.add(new Kangaroo());

        for (int i = 0; i < animals.count(); i++)
            System.out.println(animals.get(i).name);
    }
}
